package com.lmk.ms.common.vo.auth;

import com.lmk.ms.common.constants.StatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * 登录结果
 *
 * @author laomake
 * @email laomake@hotmail.com
 */
@Data
@Schema(description = "登录结果")
public class LoginResult {

    /**
     * 状态码
     */
    @Schema(description = "状态码")
    protected StatusEnum status;

    /**
     * 错误信息
     */
    @Schema(description = "错误信息")
    protected String message;

    /**
     * 登录用户
     */
    @Schema(description = "登录用户")
    protected LoginUser user;

    /**
     * 访问令牌
     */
    @Schema(description = "访问令牌")
    protected JwtToken token;

    public LoginResult() {
    }

    public LoginResult(StatusEnum status) {
        this.status = status;
    }

    public LoginResult(StatusEnum status, String message) {
        this.status = status;
        this.message = message;
    }

    public LoginResult(StatusEnum status, LoginUser user, JwtToken token) {
        this.status = status;
        this.user = user;
        this.token = token;
    }
}
